//
//  EmptyView.swift
//  DaRings
//
//  Created by 尹琼 on 2022/11/23.
//

import UIKit
import MYModule

open class EmptyView: View {
    
    public enum emptyStyle {
        
        case iconAndText
        case centerIcon
    }

    public var icon = ImageView()
    
    public var label = Label()
    
  
    open override func makeUI() {
        super.makeUI()
        
        icon.image = UIImage(named: "ic_nodata")
        label.textColor = UIColor.assist_A9A9A9
        label.font = Fonts.systemFont(ofSize: 12.0)
        
        addSubview(icon)
        addSubview(label)
        
        icon.snp.makeConstraints { make in
            make.left.equalToSuperview()
            make.centerY.equalToSuperview()
            make.bottom.lessThanOrEqualToSuperview()
        }
        
        label.snp.makeConstraints { make in
            make.left.equalTo(icon.snp.right).offset(6)
            make.right.lessThanOrEqualToSuperview()
            make.centerY.equalToSuperview()
            make.bottom.lessThanOrEqualToSuperview()
        }
    }

}
